package com.puffer.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.puffer.core.service.BaseService;
import com.puffer.dao.interfaces.UserDao;
import com.puffer.domain.SysUser;
import com.puffer.service.UserService;

@Service("userService")
public class UserServiceImpl extends BaseService implements UserService {
	@Transactional
	public SysUser findUserById(String id) {
		return null;
	}

	@Transactional
	public SysUser findLoginUser(String userName, String pass) {
		UserDao userDao = ctx.getBean("userDao", UserDao.class);
		SysUser userUser = userDao.findByUsernameAndPass(userName, pass);
		ctx.close();
		return userUser;
	}

}
